package com.aaron.study.customer.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.aaron.study.customer.feign.KeFuFeignClient;

import lombok.extern.java.Log;

/**
 * 接收来自客服的消息，需要转发给客户
 * <p>
 * <a href="https://gitee.com/aaronsd/spring-cloud-security/">spring-cloud-security</a>
 *
 * @author <a href="mailto:610195979@qq.com?subject=com.aaron.study.spring-cloud-security">aaron</a>
 * @version 0.0.1
 */
@Log
@RestController
@RequestMapping("/kefu")
public class KeFuController {
    @Autowired
	private KeFuFeignClient keFuFeignClient;

	/**
	 * 获取在线的客服列表
	 *
	 * @return list of kefu
	 */
	@GetMapping(value = "/online")
	public List<String> getKeFu() {
		return keFuFeignClient.getKeFu();
	}

}
